<template>
    <view class="page-creation-activity">
		<view class="fly-card">
			<view class="item" v-for="(item,index) in longList.list" :key="index" @click="proxy.$util.gotoPage('/packageB/creation/note', {activitiesId: item.id})">
                <view class="thumb">
                    <u-image width="100%" height="300rpx" :src="proxy.$icon.cover1"></u-image>
                </view>
                <view class="content no-border">
                    <view class="title font-bold ellipsis-2">{{ item.activitiesName }}</view>
                    <view class="desc">
                        <text class="mr-2">待参加</text>
                        <text>{{ dayjs(item.startTime).format('MM/DD HH:mm') }} {{ proxy.$util.getWeekName(dayjs(item.startTime).day()) }}</text>
                        
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
<script setup lang="ts">
import dayjs from 'dayjs';
import {onShow, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
import { useLonglist } from '@/static/fn/longList';
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
const initObj = {
	listApi:'/admin/activities/xcxPage',
}
let { searchForm, longList, getList} = useLonglist(initObj);
onPullDownRefresh(() => {
	getList('refresh');
	setTimeout( () => {
		uni.stopPullDownRefresh();
	}, 1000);
});
onReachBottom(() =>{
	getList();
});
onShow(() => {
	console.log('longlist')
	getList('refresh');
})
</script>